import 'package:mybase/base/tool/platformUtils/FFPlatform.dart';
import 'package:url_launcher/url_launcher.dart';

///跳转系统页面
class GoSystemPageTool {
  ///跳转取消订阅页面
  static Future<bool> gotoSystemSubscribePage() async {
    if (FFPlatform.isAndroid) {
      const url = 'https://play.google.com/store/account/subscriptions';
      if (await canLaunch(url)) {
        return await launch(url);
      }
    } else {
      const url = 'https://apps.apple.com/account/subscriptions';
      if (await canLaunch(url)) {
        return await launch(url);
      }
    }

    return false;
  }
}
